package com.zhy.http.okhttp.callback;

import java.io.File;
import okhttp3.Response;

public abstract class FileCallBack extends Callback<File>
{
  private String destFileDir;
  private String destFileName;

  public FileCallBack(String paramString1, String paramString2)
  {
    this.destFileDir = paramString1;
    this.destFileName = paramString2;
  }

  public abstract void inProgress(float paramFloat);

  public File parseNetworkResponse(Response paramResponse)
    throws Exception
  {
    return saveFile(paramResponse);
  }

  // ERROR //
  public File saveFile(Response paramResponse)
    throws java.io.IOException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: sipush 2048
    //   5: newarray byte
    //   7: astore_3
    //   8: aload_1
    //   9: invokevirtual 37	okhttp3/Response:body	()Lokhttp3/ResponseBody;
    //   12: invokevirtual 43	okhttp3/ResponseBody:byteStream	()Ljava/io/InputStream;
    //   15: astore_2
    //   16: aload_1
    //   17: invokevirtual 37	okhttp3/Response:body	()Lokhttp3/ResponseBody;
    //   20: invokevirtual 47	okhttp3/ResponseBody:contentLength	()J
    //   23: lstore 8
    //   25: lconst_0
    //   26: lstore 10
    //   28: new 49	java/lang/StringBuilder
    //   31: dup
    //   32: lload 8
    //   34: invokestatic 55	java/lang/String:valueOf	(J)Ljava/lang/String;
    //   37: invokespecial 58	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   40: invokevirtual 62	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   43: invokestatic 67	com/zhy/http/okhttp/utils/L:e	(Ljava/lang/String;)V
    //   46: new 69	java/io/File
    //   49: dup
    //   50: aload_0
    //   51: getfield 15	com/zhy/http/okhttp/callback/FileCallBack:destFileDir	Ljava/lang/String;
    //   54: invokespecial 70	java/io/File:<init>	(Ljava/lang/String;)V
    //   57: astore 12
    //   59: aload 12
    //   61: invokevirtual 74	java/io/File:exists	()Z
    //   64: ifne +9 -> 73
    //   67: aload 12
    //   69: invokevirtual 77	java/io/File:mkdirs	()Z
    //   72: pop
    //   73: new 69	java/io/File
    //   76: dup
    //   77: aload 12
    //   79: aload_0
    //   80: getfield 17	com/zhy/http/okhttp/callback/FileCallBack:destFileName	Ljava/lang/String;
    //   83: invokespecial 80	java/io/File:<init>	(Ljava/io/File;Ljava/lang/String;)V
    //   86: astore 13
    //   88: new 82	java/io/FileOutputStream
    //   91: dup
    //   92: aload 13
    //   94: invokespecial 85	java/io/FileOutputStream:<init>	(Ljava/io/File;)V
    //   97: astore 14
    //   99: aload_2
    //   100: aload_3
    //   101: invokevirtual 91	java/io/InputStream:read	([B)I
    //   104: istore 15
    //   106: iload 15
    //   108: iconst_m1
    //   109: if_icmpne +29 -> 138
    //   112: aload 14
    //   114: invokevirtual 94	java/io/FileOutputStream:flush	()V
    //   117: aload_2
    //   118: ifnull +7 -> 125
    //   121: aload_2
    //   122: invokevirtual 97	java/io/InputStream:close	()V
    //   125: aload 14
    //   127: ifnull +8 -> 135
    //   130: aload 14
    //   132: invokevirtual 98	java/io/FileOutputStream:close	()V
    //   135: aload 13
    //   137: areturn
    //   138: lload 10
    //   140: iload 15
    //   142: i2l
    //   143: ladd
    //   144: lstore 10
    //   146: aload 14
    //   148: aload_3
    //   149: iconst_0
    //   150: iload 15
    //   152: invokevirtual 102	java/io/FileOutputStream:write	([BII)V
    //   155: lload 10
    //   157: lstore 18
    //   159: invokestatic 108	com/zhy/http/okhttp/OkHttpUtils:getInstance	()Lcom/zhy/http/okhttp/OkHttpUtils;
    //   162: invokevirtual 112	com/zhy/http/okhttp/OkHttpUtils:getDelivery	()Landroid/os/Handler;
    //   165: new 114	com/zhy/http/okhttp/callback/FileCallBack$1
    //   168: dup
    //   169: aload_0
    //   170: lload 18
    //   172: lload 8
    //   174: invokespecial 117	com/zhy/http/okhttp/callback/FileCallBack$1:<init>	(Lcom/zhy/http/okhttp/callback/FileCallBack;JJ)V
    //   177: invokevirtual 123	android/os/Handler:post	(Ljava/lang/Runnable;)Z
    //   180: pop
    //   181: goto -82 -> 99
    //   184: astore 4
    //   186: aload 14
    //   188: astore 5
    //   190: aload_2
    //   191: ifnull +7 -> 198
    //   194: aload_2
    //   195: invokevirtual 97	java/io/InputStream:close	()V
    //   198: aload 5
    //   200: ifnull +8 -> 208
    //   203: aload 5
    //   205: invokevirtual 98	java/io/FileOutputStream:close	()V
    //   208: aload 4
    //   210: athrow
    //   211: astore 17
    //   213: goto -88 -> 125
    //   216: astore 16
    //   218: aload 13
    //   220: areturn
    //   221: astore 7
    //   223: goto -25 -> 198
    //   226: astore 6
    //   228: goto -20 -> 208
    //   231: astore 4
    //   233: aconst_null
    //   234: astore 5
    //   236: goto -46 -> 190
    //
    // Exception table:
    //   from	to	target	type
    //   99	106	184	finally
    //   112	117	184	finally
    //   146	155	184	finally
    //   159	181	184	finally
    //   121	125	211	java/io/IOException
    //   130	135	216	java/io/IOException
    //   194	198	221	java/io/IOException
    //   203	208	226	java/io/IOException
    //   8	25	231	finally
    //   28	73	231	finally
    //   73	99	231	finally
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.zhy.http.okhttp.callback.FileCallBack
 * JD-Core Version:    0.6.2
 */